<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('Article_work/index')}">文章列表</a></li>
			<li class="active"><a href="{:url('Article_work/edit')}">编辑文章</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Article_work/editPost')}">
			<div class="form-group">
				<label for="input-title" class="col-sm-2 control-label">
					<span class="form-required">*</span> 文章标题
				</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-title" name="title" placeholder="30个字符以内" value="{$article.title}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-abstract" class="col-sm-2 control-label">文章摘要</label>
				<div class="col-md-6 col-sm-10">
					<textarea name="abstract" id="input-abstract" rows="5" placeholder="100个字符以内" class="form-control" style="width: 100%;">{$article.abstract}</textarea>
				</div>
			</div>
			<div class="form-group">
				<label for="photo-1" class="col-sm-2 control-label">封面图片</label>
				<div class="col-md-6 col-sm-10">
					<input id="photo-1" type="hidden" name="image" value="$article.image">
					<input id="photo-1-name" type="text" class="form-control" readonly>
					<img id="photo-1-preview" src="/upload/{$article.image}" style="width: 200px;height: 150px;padding: 10px 0;" class="js-image-previewer">
					<div>
						<a class="btn btn-primary" href="javascript:uploadOneImage('图片上传','#photo-1');">选择图片</a>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label for="input-content" class="col-sm-2 control-label">文章内容</label>
				<div class="col-md-6 col-sm-10">
					<script type="text/plain" id="input-content" name="content" style="height: 200px;">{$article.content|default=""|htmlspecialchars_decode}</script>
				</div>
			</div>
			<div class="form-group">
				<label for="input-author" class="col-sm-2 control-label">文章作者</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-author" name="author" placeholder="15个字符以内" value="{$article.author}">
				</div>
			</div>
			<input type="hidden" name="id" value="{$article.id}">
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
	<script src="__STATIC__/js/js-image-previewer.js"></script>
	<script type="text/javascript">
		// 编辑器路径定义
		var editorURL = GV.WEB_ROOT;
	</script>
	<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript">
		var editorcontent = new baidu.editor.ui.Editor();
		editorcontent.render('input-content');
	</script>
</body>
</html>
